package com.zjxmyq.microserviceyida;

import com.gitee.sunchenbin.mybatis.actable.manager.handler.StartUpHandler;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;

@EnableDubbo
@SpringBootApplication
@MapperScan("com.zjxmyq.microserviceyida.mapper")
@MapperScan("com.gitee.sunchenbin.mybatis.actable.dao.*")
@MapperScan("com.baomidou.mybatisplus.samples.quickstart.mapper")
@ComponentScan(basePackages = {"com.zjxmyq.microserviceyida","com.gitee.sunchenbin.mybatis.actable.manager.*"})
@EnableFeignClients
public class MicroserviceYidaApplication {

	public static void main(String[] args) {
		ConfigurableApplicationContext run = SpringApplication.run(MicroserviceYidaApplication.class, args);
		// 容器中获取actable的核心处理类
		StartUpHandler bean =run.getBean(StartUpHandler.class, args);
		// 手动执行actable的建表方法
		bean.startHandler();
	}

}
